Adding Context Menus
CygNet supports two kinds of right-click context menus in Studio: Standard context menus and Custom context menus.
- A Standard context menu is defined on the Property Sheet for TheFrame/TheView and applies to the right-click context menu of the TheView or an object on TheView depending on configuration.
- A Custom context menu can be configured for the CygNet ActiveX controls that support the feature. Custom context menus are configured per control in the OCXProperties on the control’s Property Sheet.
Both types are configured using the same context menu configuration dialog box.
TheView and any object placed on TheView have a default Context Menu. The options on the menu are defined by CygNet Studio. The only option that can be removed is the Acknowledge Alarm; (see [AllowAlarmAck]) however, options can be added using the Context menu properties.
|
Context Menu |
Context Menu Properties
The properties that can be used to add custom items to a context menu are described below.
| Property | Description |
|---|---|
|
A property of an object. Items defined by this property appear only on the object’s Context menu. |
|
|
[ContextMenuAutoSelect] |
A property of an object. Items defined by this property will automatically select tools for the duration of context menu operations (for example, while a context menu is being displayed, and while any invoked dialog boxes that resulted from the context menu being displayed). |
|
A property of TheView. Items defined by this property appear on the Context menu of all objects on TheView. |
|
|
A property of TheView. Items defined by this property appear only on TheView’s Context menu. |
|
|
An ActiveX and script property associated with one of the ActiveX controls that support context menus used to identify an XML string that defines the custom context menu. |
Context Menu Events
The event handlers that can be used to perform an action based on the configured Event ID and the calling object are described below.
| Event | Description |
|---|---|
|
An event handler that runs when one of the custom context menu items that is defined or overridden by this object is clicked. |
|
|
An event handler that runs when one of the custom context menu items that is defined for objects in the view (and not overridden by the active object) is clicked. |
|
|
An event handler that run in a similar manner to EventContextMenuObjects except it handles custom context menu items from TheView’s context menu (defined in the ContextMenuView property). |
Scripting is required for an action to be performed. See Scripting in CygNet Studio for more information.
More:



